<extend name="Public/base"/>
<block name="head">
	<link href="__CSS__/cart.css" rel="stylesheet">
	
</block>
<block name="body">
<div class="am-container" >

	<form action="{:U('Buy/submit')}" method="post">
		<div class="am-g">
			<div class="top-title">
				<span class="active">商品清单</span>
			</div>
			
		</div>
		<div class="am-g cart-title">
			<h5 class="am-u-sm-4">商品名称</h5>
			<h5 class="am-u-sm-2">单价</h5>
			<h5 class="am-u-sm-2">数量</h5>
			<h5 class="am-u-sm-2">金额</h5>
			<h5 class="am-u-sm-2">操作</h5>
		</div>
		<volist name="_list" id="vo">
			<div class="am-g cart-goods">
				<div class="am-u-sm-4">
					<div class=" goods-img ">
					    <img src="{$vo.pic_url|get_image_url}">
					</div>
					<div class="goods-title ">{$vo.name}</div>
				</div>
				<div class="am-u-sm-2 goods-price">
					<div>
						{$vo.price}
					</div>
				</div>
				<div class="am-u-sm-2 ">
					<div>
						{$vo.number}
					</div>
				</div>
				<div class="am-u-sm-2 ">
					<div>
						<eq name="goods.goods_type" value="1">￥</eq>
						{$vo.subtotal}
						
					</div>
				</div>
				<div class="am-u-sm-2 ">
					<a href="{:U('Cart/del',array('id'=>$vo['id']))}" class="ajax-get confirm">
						删除
					</a>
				</div>
			</div>
		</volist>
		<div class="am-g box">
			<div class="top-title">
				<span class="active">收货地址</span>
				<a href="{:U('User/address')}">管理收货地址</a>
			</div>
		
			<div class="contents">	
				<volist name="user_address" id="vo">
					<div class="item">
						<input type="radio" name="address_id" <eq name="vo.status" value="1">checked="checked"</eq>value="{$vo.id}">
						{$vo.consignee}
						{$vo.mobile}
			 		
				 		{$vo.province|get_district_name}{$vo.city|get_district_name}{$vo.district|get_district_name}{$vo.community|get_district_name}
				 		{$vo.address}
				 	</div>
				</volist>
				
	   		</div>
		</div>
		<div class="am-g cart-total">
			<div class="am-u-sm-4 am-u-sm-offset-7">
				<span>合计:</span><span class="total">{$total.score}积分+￥{$total.total|}</span>
				<button type="submit" class="am-btn am-btn-success am-btn-lg">提交订单</button>
			</div>
		</div>
	</form>
</div>
</block>
<block name="script">
	<script>
		function showAddressList(){
			url="{:U('User/ajaxAddressList')}";
			$.post(url).success(function(data){
				$('#message .alert-content').html(data);
			});
		}
	</script>
</block>

